package com.c.ctgproject.ui.collect

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.recyclerview.widget.GridLayoutManager
import com.c.ctgproject.R
import com.c.ctgproject.adapter.CommonMenuAdapter
import com.c.ctgproject.base.BaseActivityV2
import com.c.ctgproject.databinding.ActivityMenuCarBinding
import com.c.ctgproject.entity.MenuBeanV2

class MenuCarActivity : BaseActivityV2() {
    private val mBinding by lazy { ActivityMenuCarBinding.inflate(layoutInflater) }
    override fun getLayout() = mBinding.root
    val name = ""
    private val mList = ArrayList<MenuBeanV2>()
    private val mAdapter by lazy { CommonMenuAdapter(this, mList) }
    override fun event() {
        mBinding.mMenuRV.adapter = mAdapter
        mBinding.mMenuRV.layoutManager = GridLayoutManager(this, 2, GridLayoutManager.VERTICAL, false)
        when (name) {
            "报废车" -> {
                mList.add(MenuBeanV2("车辆信息预录入", R.mipmap.icon_door_car_wait, PreInputCarInfoActivity::class.java))
                mList.add(MenuBeanV2("登记入库", R.mipmap.icon_door_car_wait, CarListActivity::class.java))
                mList.add(MenuBeanV2("车辆过磅", R.mipmap.icon_door_car_wait, CarListActivity::class.java))
                mList.add(MenuBeanV2("车辆初检", R.mipmap.icon_door_car_wait, CarListActivity::class.java))
                mList.add(MenuBeanV2("车辆预处理", R.mipmap.icon_door_car_wait, CarListActivity::class.java))
                mList.add(MenuBeanV2("拆解单列表", R.mipmap.icon_door_car_wait, CarHandlerOverListActivity::class.java))

            }
            "动力电池" -> {

            }
            "零部件" -> {

            }
            "物料" -> {

            }
        }


        mList.add(MenuBeanV2("可拆解车辆", R.mipmap.icon_door_car_wait, CarCanHandlerListActivity::class.java))

        mList.add(MenuBeanV2("毁型拍照", R.mipmap.icon_door_car_wait, DestroyTypeActivity::class.java))
        mList.add(MenuBeanV2("可拆解电池", R.mipmap.icon_door_car_wait, BatteryCanHandlerActivity::class.java))

        mList.add(MenuBeanV2("电池拆解单", R.mipmap.icon_door_car_wait, BatteryHandlerListActivity::class.java))
        mList.add(MenuBeanV2("散件录入", R.mipmap.icon_door_car_wait, PartInputActivity::class.java))
        mList.add(MenuBeanV2("散件入库查询", R.mipmap.icon_door_car_wait, AllPartActivity::class.java))

        mList.add(MenuBeanV2("电池散件入库", R.mipmap.icon_door_car_wait, PowerBatteryInWarehouseSingleActivity::class.java))
        mList.add(MenuBeanV2("电池入库单", R.mipmap.icon_door_car_wait, PowerBatteryInWarehouseActivity::class.java))
        mList.add(MenuBeanV2("电池出库", R.mipmap.icon_door_car_wait, BatteryCanHandlerActivity::class.java))


        mList.add(MenuBeanV2("电池出库单", R.mipmap.icon_door_car_wait, PowerBatteryOutWarehouseActivity::class.java))
        mList.add(MenuBeanV2("零部件出库", R.mipmap.icon_door_car_wait, PartOutListActivity::class.java))
        mList.add(MenuBeanV2("零部件出库单", R.mipmap.icon_door_car_wait, PartOutActivity::class.java))

        mList.add(MenuBeanV2("可拆配件", R.mipmap.icon_door_car_wait, PartHandlerListActivity::class.java))
        mList.add(MenuBeanV2("零件拆解单", R.mipmap.icon_door_car_wait, PartHandlerOverActivity::class.java))
    }

    override fun click() {

    }
}